package cn.zzuli.myfirstapp;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
    private Button myBtn_two;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button myBtn_one = (Button) findViewById(R.id.btn_one);
        myBtn_one.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Uri uri= Uri.parse("https://www.wanandroid.com/");
                Intent intent;
                intent = new Intent(Intent.ACTION_VIEW,uri);
                startActivity(intent);
            }
        });
        myBtn_two=(Button) findViewById(R.id.btn_two);
        myBtn_two.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                Intent it=new Intent();
                it.setClass(MainActivity.this, SkipActivity.class);
                startActivity(it);
            }
        });

    }
}